package com.ego.ware.feign;

import com.ego.common.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @program: ego
 * @description: 远程调用商品服务
 * @author: KamTang
 * @create: 2022-11-25 10:45
 **/
@FeignClient("ego-product")
public interface ProductFeign {
    /**
     * 根据skuId获取具体Sku
     * @param skuId skuId
     * @return @see
     * @see Result
     */
    @GetMapping("product/sku-info/get/{skuId}")
    Result get(@PathVariable("skuId") Long skuId);

    /**
     * 过去当前分类的路径
     * @param catId 分类id
     * @return Long型数组
     */
    @GetMapping("product/category/path/{catId}")
    Result getCatPath(@PathVariable("catId") Long catId);
}
